package ${packageName}.api.code;
public enum  ${applicationName}ErrorCode {

    ERR_600(600, "业务处理异常"),
    ERR_601(601, "提现流水ID不能为空");

    private int status;

    private String message;

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    ${applicationName}ErrorCode(int status, String message) {
        this.status = status;
        this.message = message;
    }

    public static ${applicationName}ErrorCode fromHttpStatus(int httpStatus) {
        for(${applicationName}ErrorCode errorCode : values()) {
            if(errorCode.getStatus() == httpStatus) {
                return errorCode;
            }
        }
        return ERR_600;
    }
}
